﻿<UserControl x:Class="JayDev.MediaScribe.View.Controls.NavigationControl2"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WPF4"
             xmlns:mwt="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
             xmlns:nmCommon="clr-namespace:JayDev.MediaScribe.Common;assembly=MediaScribe.Common"
             xmlns:nmControls="clr-namespace:JayDev.MediaScribe.View.Controls"
             xmlns:nmConverters="clr-namespace:JayDev.MediaScribe.Converters"
             x:Name="NavigationControlName"
             d:DesignHeight="90" d:DesignWidth="1300">
    <UserControl.Resources>
        <Style x:Key="MySeparatorStyle" TargetType="{x:Type Separator}">
            <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
            <Setter Property="Margin" Value="0,2,0,2"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Separator}">
                        <Border 
                        BorderBrush="{TemplateBinding BorderBrush}" 
                        BorderThickness="{TemplateBinding BorderThickness}" 
                        Background="#B9C9DA" 
                        Height="1" 
                        SnapsToDevicePixels="true"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ChangeMyFonts" TargetType="{x:Type TextBlock}">
            <Setter Property="FontSize" Value="12" />
        </Style>
        <nmConverters:NavigationCheckedConverter     
                x:Key="NavigationCheckedConverter" />
        <nmConverters:NavigationVisibilityConverter     
                x:Key="NavigationVisibilityConverter" />
        <nmConverters:BooleanToVisibilityConverter 
                x:Key="BooleanToVisibilityConverterFalseIsVisible" 
                True="Collapsed" 
                False="Visible" />
    </UserControl.Resources>
    <Grid Height="50" VerticalAlignment="Top">
        <Grid.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFDEE6EF" Offset="0.2"/>
                <!--<GradientStop Color="#FF75B2DE" Offset="1"/>-->
            </LinearGradientBrush>
        </Grid.Background>



        <Viewbox Stretch="Fill" Margin="0,-6,0,0" RenderTransformOrigin="0.5,0.5" Height="72" VerticalAlignment="Top" Visibility="Collapsed">
            <Grid Height="60" Width="1832">
                <Border BorderBrush="#FF75B2DE" BorderThickness="1">
                <Image Source="/MediaScribe;component/Images/bar.png" Stretch="Fill" />
                </Border>
            </Grid>
        </Viewbox>

        <Border BorderThickness="0,0,0,1" BorderBrush="#FF75B2DE" Margin="0,0,0,1" SnapsToDevicePixels="True">
                        <Grid Visibility="Visible" DockPanel.Dock="Top" Height="50">

                <Grid >
                    <TextBlock FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding CourseName}" MaxWidth="450" />

                </Grid>
                <StackPanel Orientation="Horizontal">

                    <Border>
                    <StackPanel Orientation="Horizontal">
                        <nmControls:UntoggleableToggleButton Grid.Column="0" Height="35" Width="100" Margin="10 0 0 0" Style="{DynamicResource JarrodToggleButton}" VerticalAlignment="Center"
                                  Command="{Binding NavigateCommand}" CommandParameter="{x:Static nmCommon:NavigateMessage.ListCourses}"
                                  IsChecked="{Binding CurrentPage, Mode=OneWay, Converter={StaticResource NavigationCheckedConverter}, ConverterParameter={x:Static nmCommon:NavigateMessage.ListCourses}, UpdateSourceTrigger=PropertyChanged}"
                                  ToolTip="Return to the course list">
                            <Grid>
                                <Image Width="16" Height="16" Source="/MediaScribe;component/Images/mp_viewer.png" Stretch="Fill" Margin="0 0 0 0" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                <TextBlock Margin="18 0 0 0" Foreground="White" FontSize="14" VerticalAlignment="Center"><TextBlock.Effect> 
								    <BlurEffect Radius="4" RenderingBias="Quality" />  
							    </TextBlock.Effect><Run Text="Course List"/></TextBlock>
                                    <TextBlock Margin="18 0 0 0" Foreground="#F111" FontSize="14" VerticalAlignment="Center"><Run Text="Course List"/></TextBlock>
                            </Grid>
                            </nmControls:UntoggleableToggleButton>


                            <nmControls:UntoggleableToggleButton Grid.Column="1" Height="35" Width="90" Margin="10 0 0 0" Style="{DynamicResource JarrodToggleButton}" VerticalAlignment="Center"
                                  Command="{Binding NavigateCommand}" CommandParameter="{x:Static nmCommon:NavigateMessage.Settings}"
                                  IsChecked="{Binding CurrentPage, Mode=OneWay, Converter={StaticResource NavigationCheckedConverter}, ConverterParameter={x:Static nmCommon:NavigateMessage.Settings}, UpdateSourceTrigger=PropertyChanged}"
                                    ToolTip="Configure various application settings">
                            <Grid>
                                <Image Width="16" Height="16" Source="/MediaScribe;component/Images/system-settings-2.png" Stretch="Fill" Margin="0 0 0 0" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                    <TextBlock Margin="18 0 0 0" Foreground="White" FontSize="14" VerticalAlignment="Center"><TextBlock.Effect> 
								    <BlurEffect Radius="4" RenderingBias="Quality" />  
							    </TextBlock.Effect><Run Text="Settings"/></TextBlock>
                                    <TextBlock Margin="18 0 0 0" Foreground="#F111" FontSize="14" VerticalAlignment="Center"><Run Text="Settings"/></TextBlock>
                            </Grid>
                            </nmControls:UntoggleableToggleButton>

                            <nmControls:UntoggleableToggleButton Grid.Column="3" Height="35" Width="110" Margin="10 0 0 0" Style="{DynamicResource JarrodToggleButton}" VerticalAlignment="Center"
                                  Command="{Binding NavigateCommand}" CommandParameter="{x:Static nmCommon:NavigateMessage.WriteCourseNotes}"
                                  IsChecked="{Binding CurrentPage, Mode=OneWay, Converter={StaticResource NavigationCheckedConverter}, ConverterParameter={x:Static nmCommon:NavigateMessage.WriteCourseNotes}, UpdateSourceTrigger=PropertyChanged}">
                            <Grid>
                                <Image Width="16" Height="16" Source="/MediaScribe;component/Images/preferences-composer.png" Stretch="Fill" Margin="0 0 0 0" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                <TextBlock Margin="18 0 0 0" Foreground="White" FontSize="14" VerticalAlignment="Center"><TextBlock.Effect> 
								    <BlurEffect Radius="4" RenderingBias="Quality" />  
							    </TextBlock.Effect><Run Text="Write Notes"/></TextBlock>
                                    <TextBlock Margin="18 0 0 0" Foreground="#F111" FontSize="14" VerticalAlignment="Center"><Run Text="Write Notes"/></TextBlock>
                            </Grid>
                            </nmControls:UntoggleableToggleButton>

                            <!--<Button Grid.Column="4" Height="35" Width="80" Margin="10 0 0 0" Style="{DynamicResource GlassButton2}" VerticalAlignment="Center"
                                  Command="{Binding ExportCommand}" CommandParameter="{x:Static nmCommon:NavigateMessage.ListCourses}"
                                  Visibility="{Binding CurrentPage, Mode=OneWay, Converter={StaticResource NavigationVisibilityConverter}, ConverterParameter={x:Static nmCommon:NavigateMessage.WriteCourseNotes}, UpdateSourceTrigger=PropertyChanged}"
                                    ToolTip="Export all notes for the course as an Excel spreadsheet">
                            <Grid>
                                <Image Width="16" Height="16" Source="/MediaScribe;component/Images/archive-insert-2.png" Stretch="Fill" Margin="0 0 0 0" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                <TextBlock Margin="18 0 0 0" Foreground="#FF00388D" FontSize="14" VerticalAlignment="Center"><TextBlock.Effect> 
								    <BlurEffect Radius="4" RenderingBias="Quality" />  
							    </TextBlock.Effect><Run Text="Export"/></TextBlock>
                                <TextBlock Margin="18 0 0 0" Foreground="White" FontSize="14" VerticalAlignment="Center"><Run Text="Export"/></TextBlock>
                            </Grid>
                            </Button>-->
                            <!--<Button Width="179" Margin="10 0 0 0" Height="35" Foreground="#FFFFFFFF" Template="{DynamicResource GlassButton2}" HorizontalAlignment="Right">
                                <StackPanel HorizontalAlignment="Left" Width="Auto" Height="Auto" Orientation="Horizontal">
                                    <TextBlock VerticalAlignment="Center" FontSize="12" Text="Internet Explorer" TextWrapping="Wrap"/>
                                </StackPanel>
                            </Button>-->
                        </StackPanel>
                    </Border>
                </StackPanel>
                            <!--" Background="Transparent" BorderThickness="0" BorderBrush="Transparent" Command="{Binding NavigateCommand}" CommandParameter="{x:Static nmCommon:NavigateMessage.MaintainCourse}">
                        <StackPanel>
                            <Image Source="/MediaScribe;component/Images/system-settings-2.png" Height="48" Width="48" />
                            <TextBlock HorizontalAlignment="Center" Style="{StaticResource ChangeMyFonts}">Settings</TextBlock>
                        </StackPanel>
                        </Button>-->

                            <!--<ContentControl Grid.Column="2">
                                <Separator Margin="0 10" Style="{StaticResource MySeparatorStyle}">
                                    <Separator.LayoutTransform>
                                        <RotateTransform Angle="90" />
                                    </Separator.LayoutTransform>
                                </Separator>
                            </ContentControl>-->


                <!--<nmControls:NavigationButton Grid.Column="4" Text="Review&#13;Notes" MySource="/MediaScribe;component/Images/text-x-generic.png" IsEnabled="False" />-->
                            <!--<ContentControl Grid.Column="5">
                                <Separator Margin="0 10" Style="{StaticResource MySeparatorStyle}">
                                    <Separator.LayoutTransform>
                                        <RotateTransform Angle="90" />
                                    </Separator.LayoutTransform>
                                </Separator>
                            </ContentControl>-->
                            <!--<nmControls:NavigationButton Grid.Column="7" Text="Configure&#13;Tags" MySource="/MediaScribe;component/Images/seahorse.png" IsEnabled="False" />-->
                            <!--<nmControls:NavigationButton Grid.Column="8" Text="Export" MySource="/MediaScribe;component/Images/archive-insert-2.png"
                                                            Command="{Binding ExportCommand}" />-->

                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0 0 0 0">
                    <!--<Grid Margin="00 0 10 0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="70"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="30"/>
                                    <ColumnDefinition Width="20"/>
                                </Grid.ColumnDefinitions>
                                <TextBox Grid.Column="1" Width="250" VerticalAlignment="Center" Foreground="LightGray" Text="Search notes..." HorizontalAlignment="Right" />
                                <Image Grid.Column="2" Source="/MediaScribe;component/Images/system-search-4.png" Height="24" Width="24" />
                            </Grid>-->

                    <nmControls:NavigationButton Margin="00 -3 5 0" MySource="/MediaScribe;component/Images/archive-insert-2.png" Height="48" Width="50"
                                                        Visibility="{Binding CurrentPage, Mode=OneWay, Converter={StaticResource NavigationVisibilityConverter}, ConverterParameter={x:Static nmCommon:NavigateMessage.WriteCourseNotes}, UpdateSourceTrigger=PropertyChanged}"
                                                        IsContextMenuButton="True"
                                                        ToolTip="Export all notes for the course as an Excel spreadsheet">
                        <nmControls:NavigationButton.ContextMenu>
                            <ContextMenu Placement="Bottom">
                                <MenuItem Header="Export to Excel Spreadsheet"  Command="{Binding ExportExcelCommand}">
                                </MenuItem>
                                <MenuItem Header="Export to CSV file (to import in another MediaScribe)" Command="{Binding ExportCsvCommand}">
                                </MenuItem>
                                <MenuItem Header="Import from CSV file" Command="{Binding ImportCsvCommand}">
                                </MenuItem>
                            </ContextMenu>
                        </nmControls:NavigationButton.ContextMenu>
                    </nmControls:NavigationButton>
                    <nmControls:NavigationButton Margin="00 -3 5 0" MySource="/MediaScribe;component/Images/fullscreen.png" Height="48" Width="50"
                                                                Visibility="{Binding CurrentPage, Mode=OneWay, Converter={StaticResource NavigationVisibilityConverter}, ConverterParameter={x:Static nmCommon:NavigateMessage.WriteCourseNotes}, UpdateSourceTrigger=PropertyChanged}"
                                                                Command="{Binding ToggleFullscreenCommand}"
                                                                ToolTip="Go to Fullscreen mode" />
                    <nmControls:NavigationButton Margin="00 -3 5 0" MySource="/MediaScribe;component/Images/info32.png" Height="48" Width="50"
                                                                Command="{Binding ShowAboutDialog}"
                                                                ToolTip="About" />

                    <!--<nmControls:NavigationButton Margin="00 0 10 0" Text="Show All&#13;Tracks' Notes" MySource="/MediaScribe;component/Images/filter.png" IsEnabled="False"
                                                                Visibility="{Binding CurrentPage, Mode=OneWay, Converter={StaticResource NavigationVisibilityConverter}, ConverterParameter={x:Static nmCommon:NavigateMessage.WriteCourseNotes}, UpdateSourceTrigger=PropertyChanged}"
                                                                ToolTip="Toggle between showing notes for the entire course, or only the selected track"/>
                    <nmControls:NavigationButton Margin="00 0 10 0" Text="Lock Edit" MySource="/MediaScribe;component/Images/system-config-rootpassword.png" IsEnabled="False"
                                                                Visibility="{Binding CurrentPage, Mode=OneWay, Converter={StaticResource NavigationVisibilityConverter}, ConverterParameter={x:Static nmCommon:NavigateMessage.WriteCourseNotes}, UpdateSourceTrigger=PropertyChanged}"/>-->
                            
                            
                    <!--<nmControls:NavigationButton Margin="00 0 10 0" Text="Show Two&#13;Lists" MySource="/MediaScribe;component/Images/two_columns.png" IsEnabled="False"
                                                                Visibility="{Binding CurrentPage, Mode=OneWay, Converter={StaticResource NavigationVisibilityConverter}, ConverterParameter={x:Static nmCommon:NavigateMessage.WriteCourseNotes}, UpdateSourceTrigger=PropertyChanged}"/>-->
                            <!--<nmControls:NavigationButton Grid.Column="14" Text="Sort List" MySource="/MediaScribe;component/Images/view-sort-descending.png" IsEnabled="False" />
                            <nmControls:NavigationButton Grid.Column="15" Text="Filter List" MySource="/MediaScribe;component/Images/filter.png" IsEnabled="False" />
                            <nmControls:NavigationButton Grid.Column="16" Text="Change List&#13;Font Size" MySource="/MediaScribe;component/Images/fonts.png" IsEnabled="False" />-->
                            
                    <!--<nmControls:NavigationButton Margin="00 0 10 0" Text="Change List&#13;Columns" MySource="/MediaScribe;component/Images/view-file-columns.png" IsEnabled="False"
                                                                Visibility="{Binding CurrentPage, Mode=OneWay, Converter={StaticResource NavigationVisibilityConverter}, ConverterParameter={x:Static nmCommon:NavigateMessage.WriteCourseNotes}, UpdateSourceTrigger=PropertyChanged}"/>-->
                    <ContentControl Margin="0 0 5 0" />
                </StackPanel>

                        </Grid>
                    </Border>
    </Grid>
</UserControl>
